<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title> - 招财树配置</title>
	    <meta name="keywords" content="">
	    <meta name="description" content="">
	    <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
	    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
	    <link href="css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
	    <link href="css/animate.css" rel="stylesheet">
	    <link href="css/style.css?v=4.1.0" rel="stylesheet">
	    <link href="css/new_file.css" rel="stylesheet">
	</head>
	<body class="gray-bg">
		<div class="wrapper wrapper-content  animated fadeInRight">
			<div class="row">
				<div class="col-sm-12">
					<div class="ibox ">
						<div class="ibox-title">
							<h5>招财树配置</h5>
						</div>
						<div class="toogl_body">
	                    	<a href="Money.html"><button type="button" class="btn btn-w-m btn-bt btn-info">招财树配置</button></a>
	                    	<!-- <a href="Money_1.html"><button type="button" class="btn btn-w-m btn-white btn-bt">数据统计</button></a> -->
	                    	<a href="Statistics.html"><button type="button" class="btn btn-w-m btn-bt btn-white">招财树明细</button></a>
	                    	<a href="Statistics_1.html"><button type="button" class="btn btn-w-m btn-white btn-bt">招财树概况</button></a>
	                    	<hr style="clear: both;"/>
							<div class="ibox-content ibox-jqGrid">
								<div class="form-group">
	                              <!--   <label class="col-sm-2 control-dy" style="width: 91px;">等级上限：</label>
	                                <div class="col-sm-8 form-time1">
	                                    <input type="text" placeholder="请输入等级上限" class="form-control" value="" id="money_tex"> 
	                                </div> -->
	                                <label class="col-sm-2 control-dy">领取时隔：</label>
	                                <div class="col-sm-8 form-time1">
	                                    <input type="text" placeholder="请输入领取时隔 /min" class="form-control"> 
	                                </div>
	                                <button type="button" class="btn btn-w-m btn-info" onclick="money()">创建</button>
	                            	<button type="button" class="btn btn-w-m btn-info" onclick="save()">保存</button>
	                            </div>
	                            <div class="mon">
	                            	<div class="mon_top">
	                            		<span>等级</span>
	                            		<span>所需捐赠金币</span>
	                            		<span>返还金币</span>
	                            		<span>操作</span>
	                            		<!-- <span>删除</span> -->
	                            	</div>
	                            	<div class="mon_bod" id = "empty">
	                            		<!-- <div class="mon_bod2">
		                            		<span class="mon_dj">1</span>
		                            		<span><input type="text" class="form-control form-wit" placeholder="请输入所需捐赠金币"></span>
		                            		<span><input type="text" class="form-control form-wit" placeholder="请输入返还金币"></span>
	                            		</div> -->
	                            	</div>
	                            </div>
		                    </div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
	    <script src="js/jquery.min.js?v=2.1.4"></script>
	    <script src="js/bootstrap.min.js?v=3.3.6"></script>
	    <script src="js/plugins/peity/jquery.peity.min.js"></script>
	    <script src="js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
	    <script src="js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
	    <script src="js/content.js?v=1.0.0"></script>
    	<script src="js/plugins/laydate/laydate.js"></script>
		<script>
        function money(){
    		var Mon = parseInt($('#money_tex').val());
            var monk = $(".mon");
            var monb = $(".mon_bod");
            var monb2 = $(".mon_bod2");
            var mont = $('.mon_dj').text();
    			$('.mon_bod').show();
    			monb.append('<div class="mon_bod2"><span><input type="text" class="form-control form-wit level" placeholder="请输入等级" id="level"></span><span><input type="text" class="form-control form-wit" placeholder="请输入所需捐赠金币" id="need_gold"></span><span><input type="text" class="form-control form-wit"placeholder="请输入返还金币" id="return_gold"></span><button onclick="del(this)" class="btn-info btn-die">删除</button></div>');
    	}
    	function del(t){
    		$(t).parent().remove();
    	}
	    function save(){
	        var numArr = []; // 定义一个空数组
	        var txt = $('.mon_bod').find('input'); // 获取所有文本框
	        for (var i = 0; i < txt.length; i++) {
	            numArr.push(txt.eq(i).val()); // 将文本框的值添加到数组中
	        }
	        console.info(numArr);
	        var data = numArr;
			var result = [];
			for(var i=0,len=data.length;i<len;i+=3){
			   result.push(data.slice(i,i+3));
			}
	        console.info(result);
	    }
    </script>


	</body>

</html>